package jmine.tec.utils.date;

import bancosys.tec.exception.LocalizedMessageHolder;
import bancosys.tec.exception.MessageCreator;
import bancosys.tec.exception.MessageCreatorHelper;

/**
 * Enum that contains the week days.
 * 
 * @author Fabio Sakiyama
 */
public enum WeekDaysEnum implements MessageCreator {

    SUNDAY("utils.week.days.sunday"),

    MONDAY("utils.week.days.monday"),

    TUESDAY("utils.week.days.tuesday"),

    WEDNESDAY("utils.week.days.wednesday"),

    THURSDAY("utils.week.days.thursday"),

    FRIDAY("utils.week.days.friday"),

    SATURDAY("utils.week.days.saturday");

    private final MessageCreator weekDayName;

    /**
     * C'tor
     * 
     * @param weekDayNameKey name of the week day
     */
    private WeekDaysEnum(String weekDayNameKey) {
        this.weekDayName = MessageCreatorHelper.creator("jmine-tec-utils-messages", weekDayNameKey, 0);

    }

    /**
     * @return the weekDayName
     */
    public LocalizedMessageHolder getWeekDayName() {
        return this.weekDayName.create();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return this.getWeekDayName().getMessage();
    }

    /**
     * {@inheritDoc}
     */
    public LocalizedMessageHolder create(Object... arguments) {
        return this.weekDayName.create(arguments);
    }

    /**
     * {@inheritDoc}
     */
    public int getExpectedArguments() {
        return this.weekDayName.getExpectedArguments();
    }
}